<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>

<!--  JQuery  -->
<script type="text/javascript" src="../jquery/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="../jquery/jquery-ui-1.8.20.custom.min.js"></script>
<link type="text/css"
	href="../jquery/smoothness/jquery-ui-1.10.1.custom.css"
	rel="stylesheet" />
<link type="text/css"
	href="../jquery/smoothness/jquery-ui-1.10.1.custom.min.css"
	rel="stylesheet" />


<!-- Bootstrap -->
<link href="../twbootstrap/css/bootstrap.min.css" rel="stylesheet"
	media="screen">
<link href="../twbootstrap/css/bootstrap-responsive.min.css"
	rel="stylesheet" media="screen">
<script src="../twbootstrap/js/bootstrap.min.js"></script>
<script src="../twbootstrap/js/bootstrap-dropdown.js"></script>



<!-- Tree View -->
<link rel="stylesheet" href="../treeview/jquery.treeview.css" />
<script type="text/javascript" src="../treeview/tree/jquery.treeview.js"></script>
<!-- Tree View end -->
<link type="text/css" href="../styles/style.css" rel="stylesheet" />

<script type="text/javascript">
	$(document).ready(function() {
		$("#example tbody").click(function(event) {
			$(oTable.fnSettings().aoData).each(function() {
				$(this.nTr).removeClass('row_selected');
			});

			$(event.target.parentNode).addClass('row_selected');
		});

		$('#example tbody tr').live('click', function(event) {
			var aData = oTable.fnGetData(this); // get datarow
			if (null != aData) // null if we clicked on title row
			{
				//now aData[0] - 1st column(count_id), aData[1] -2nd, etc
				//alert("ID: " + aData[0]);
				// window.location = "viewarticle.jsp?articleid=" + aData[0];
			}
		});
	});

	function PageInit() {
		$.ajax({
			type : "get",
			url : "../GetSections",
			success : function(data) {
				$("#sections").html(data);
				$("#example2").treeview();
			},
			error : function(jqXHR, textStatus) {
				alert("Request failed: " + textStatus);
			}
		});
	}
</script>
</head>

<body onload="PageInit()">

	<form id="myForm" action="search.jsp" method="get"
		onsubmit="mySubmit()">


		<input type="hidden" id="searchstr" name='searchstr' value='' />


		<script>
			function mySubmit() {
				// alert("Data: "+ $("#searchparam").val());
				document.getElementById('searchstr').value = $("#searchparam")
						.val();
				document.getElementById("myForm").submit();
			}
		</script>



		<div class="navbar navbar-static-top">
			<div class="navbar-inner">
				<a class="brand" href="../wiki/home.jsp">Issue Tracker</a>
				<ul class="nav">
					<li class="divider-vertical"></li>
					<li id="addissue"><a href="../wiki/addIssue.jsp">Add Issue</a></li>
					<li class="divider-vertical"></li>
					<li id="allissue"><a href="../wiki/allIssues.jsp">Issues</a></li>
					<li class="divider-vertical"></li>
					<li class="span2"></li>
					<div class="form-search nav pull-right">
						<li class="input-append" style="margin-top: 5px;"><input
							id="searchparam" type="text" class="span4 search-query">
							<button type="submit" class="btn">Search</button></li>
					</div>

				</ul>

				<ul class="nav pull-right">
					<li class="divider-vertical"></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown">Admin <b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="settings.jsp">Modules</a></li>
							<li><a href="userroles.jsp">Permissions</a></li>
							<li><a href="reports.jsp">Reports</a></li>
						</ul></li>
					<li class="divider-vertical"></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown">Welcome <%=(String) session.getAttribute("firstname")%>
							<b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="SendFeedback.jsp">Send Feedback</a></li>
							<li><a href="Logout.jsp">Logout</a></li>
						</ul></li>
				</ul>
			</div>
		</div>
	</form>


	<h4>All Issues</h4>
	<div
		style="padding-top: 25px; padding-bottom: 10px; padding-left: 5px;">
		<a
			style="text-decoration: none; color: darkslategray; font-size: 14px; font-weight: bold">
			Articles </a>
	</div>
	<div id="sections" class="leftnav"></div>
</body>
</html>